home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / Source / StereoScope-3.2 / dotAt.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-30  |  5.5 KB  |  169 lines

  1. /* dotAt.c generated from dotAt.psw
  2.    by unix pswrap V1.009  Wed Apr 19 17:50:24 PDT 1989
  3.  */
  4.  
  5. #include <dpsclient/dpsfriends.h>
  6. #include <string.h>
  7.  
  8. #line 1 "dotAt.psw"
  9. #line 10 "dotAt.c"
  10. void dotAt(float mkcpath[], int ntotal, int mygstate)
  11. {
  12.   typedef struct {
  13.     unsigned char tokenType;
  14.     unsigned char topLevelCount;
  15.     unsigned short nBytes;
  16.  
  17.     DPSBinObjGeneric obj0;
  18.     DPSBinObjGeneric obj1;
  19.     DPSBinObjGeneric obj2;
  20.     DPSBinObjGeneric obj3;
  21.     DPSBinObjGeneric obj4;
  22.     DPSBinObjGeneric obj5;
  23.     DPSBinObjGeneric obj6;
  24.     DPSBinObjGeneric obj7;
  25.     DPSBinObjGeneric obj8;
  26.     DPSBinObjGeneric obj9;
  27.     DPSBinObjGeneric obj10;
  28.     DPSBinObjGeneric obj11;
  29.     DPSBinObjGeneric obj12;
  30.     DPSBinObjGeneric obj13;
  31.     DPSBinObjGeneric obj14;
  32.     DPSBinObjGeneric obj15;
  33.     DPSBinObjGeneric obj16;
  34.     DPSBinObjGeneric obj17;
  35.     DPSBinObjGeneric obj18;
  36.     DPSBinObjGeneric obj19;
  37.     DPSBinObjGeneric obj20;
  38.     DPSBinObjGeneric obj21;
  39.     } _dpsQ;
  40.   static const _dpsQ _dpsStat = {
  41.     DPS_DEF_TOKENTYPE, 10, 180,
  42.     {DPS_LITERAL|DPS_ARRAY, 0, 0, 176},    /* param[var]: mkcpath */
  43.     {DPS_EXEC|DPS_ARRAY, 0, 0, 176},
  44.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 73},    /* forall */
  45.     {DPS_LITERAL|DPS_INT, 0, 0, 1},
  46.     {DPS_LITERAL|DPS_INT, 0, 0, 1},
  47.     {DPS_LITERAL|DPS_INT, 0, 0, 0},    /* param: ntotal */
  48.     {DPS_LITERAL|DPS_INT, 0, 0, 2},
  49.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 54},    /* div */
  50.     {DPS_EXEC|DPS_ARRAY, 0, 12, 80},
  51.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 72},    /* for */
  52.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 117},    /* pop */
  53.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  54.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  55.     {DPS_LITERAL|DPS_INT, 0, 0, 5},
  56.     {DPS_LITERAL|DPS_INT, 0, 0, 5},
  57.     {DPS_LITERAL|DPS_INT, 0, 0, 0},    /* param: mygstate */
  58.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 212},    /* execuserobject */
  59.     {DPS_LITERAL|DPS_INT, 0, 0, 7},
  60.     {DPS_LITERAL|DPS_INT, 0, 0, -2},
  61.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 135},    /* roll */
  62.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* PlusD */
  63.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* composite */
  64.     }; /* _dpsQ */
  65.   _dpsQ _dpsF;    /* local copy  */
  66.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  67.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  68.   static long int _dpsCodes[2] = {-1};
  69.   register int _dps_offset = 176;
  70.   {
  71. if (_dpsCodes[0] < 0) {
  72.     static const char * const _dps_names[] = {
  73.     "PlusD",
  74.     "composite"};
  75.     long int *_dps_nameVals[2];
  76.     _dps_nameVals[0] = &_dpsCodes[0];
  77.     _dps_nameVals[1] = &_dpsCodes[1];
  78.  
  79.     DPSMapNames(_dpsCurCtxt, 2, _dps_names, _dps_nameVals);
  80.     }
  81.   }
  82.  
  83.   _dpsF = _dpsStat;    /* assign automatic variable */
  84.  
  85.   _dpsP[0].length = ntotal;
  86.   _dpsP[5].val.integerVal = ntotal;
  87.   _dpsP[15].val.integerVal = mygstate;
  88.   _dpsP[20].val.nameVal = _dpsCodes[0];
  89.   _dpsP[21].val.nameVal = _dpsCodes[1];
  90.   _dpsP[0].val.arrayVal = _dps_offset;
  91.   _dps_offset += ntotal * sizeof(DPSBinObjGeneric);
  92.  
  93.   _dpsF.nBytes = _dps_offset+4;
  94.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,180);
  95.   DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)mkcpath, ntotal);
  96. }
  97. #line 9 "dotAt.psw"
  98.  
  99. #line 100 "dotAt.c"
  100. void dotAtPSonly(float mkcpath[], int ntotal, float radius, float shade)
  101. {
  102.   typedef struct {
  103.     unsigned char tokenType;
  104.     unsigned char topLevelCount;
  105.     unsigned short nBytes;
  106.  
  107.     DPSBinObjGeneric obj0;
  108.     DPSBinObjGeneric obj1;
  109.     DPSBinObjGeneric obj2;
  110.     DPSBinObjGeneric obj3;
  111.     DPSBinObjGeneric obj4;
  112.     DPSBinObjGeneric obj5;
  113.     DPSBinObjGeneric obj6;
  114.     DPSBinObjGeneric obj7;
  115.     DPSBinObjGeneric obj8;
  116.     DPSBinObjGeneric obj9;
  117.     DPSBinObjGeneric obj10;
  118.     DPSBinObjGeneric obj11;
  119.     DPSBinObjReal obj12;
  120.     DPSBinObjGeneric obj13;
  121.     DPSBinObjGeneric obj14;
  122.     DPSBinObjGeneric obj15;
  123.     DPSBinObjReal obj16;
  124.     DPSBinObjGeneric obj17;
  125.     DPSBinObjGeneric obj18;
  126.     DPSBinObjGeneric obj19;
  127.     } _dpsQ;
  128.   static const _dpsQ _dpsStat = {
  129.     DPS_DEF_TOKENTYPE, 10, 164,
  130.     {DPS_LITERAL|DPS_ARRAY, 0, 0, 160},    /* param[var]: mkcpath */
  131.     {DPS_EXEC|DPS_ARRAY, 0, 0, 160},
  132.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 73},    /* forall */
  133.     {DPS_LITERAL|DPS_INT, 0, 0, 1},
  134.     {DPS_LITERAL|DPS_INT, 0, 0, 1},
  135.     {DPS_LITERAL|DPS_INT, 0, 0, 0},    /* param: ntotal */
  136.     {DPS_LITERAL|DPS_INT, 0, 0, 2},
  137.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 54},    /* div */
  138.     {DPS_EXEC|DPS_ARRAY, 0, 10, 80},
  139.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 72},    /* for */
  140.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 117},    /* pop */
  141.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 111},    /* newpath */
  142.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: radius */
  143.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  144.     {DPS_LITERAL|DPS_INT, 0, 0, 360},
  145.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 5},    /* arc */
  146.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: shade */
  147.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},    /* setgray */
  148.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 66},    /* fill */
  149.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 167},    /* stroke */
  150.     }; /* _dpsQ */
  151.   _dpsQ _dpsF;    /* local copy  */
  152.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  153.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  154.   register int _dps_offset = 160;
  155.   _dpsF = _dpsStat;    /* assign automatic variable */
  156.  
  157.   _dpsP[0].length = ntotal;
  158.   _dpsP[5].val.integerVal = ntotal;
  159.   _dpsP[12].val.realVal = radius;
  160.   _dpsP[16].val.realVal = shade;
  161.   _dpsP[0].val.arrayVal = _dps_offset;
  162.   _dps_offset += ntotal * sizeof(DPSBinObjGeneric);
  163.  
  164.   _dpsF.nBytes = _dps_offset+4;
  165.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,164);
  166.   DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)mkcpath, ntotal);
  167. }
  168. #line 19 "dotAt.psw"
  169.